import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download
} = request

// 查询事故案例原因全部
export const riskAccidentCasesReasonList = data => {
    return $get('/risk/riskAccidentCasesReason/list', data)
}

// 查询事故案例原因列表
export const riskAccidentCasesReasonPage = data => {
    return $get('/risk/riskAccidentCasesReason/page', data)
}

// 新增事故案例原因
export const riskAccidentCasesReasonAdd = data => {
    return $post('/risk/riskAccidentCasesReason/add', data)
}

// 查询事故案例原因详情
export const riskAccidentCasesReasonDetail = id => {
    return $get('/risk/riskAccidentCasesReason/detail/'+ id)
}

// 更新事故案例原因
export const riskAccidentCasesReasonUpdate = data => {
    return $post('/risk/riskAccidentCasesReason/update', data)
}

// 删除事故案例原因
export const riskAccidentCasesReasonDelete = id => {
    return $post('/risk/riskAccidentCasesReason/delete/'+ id)
}

// 导出事故案例原因
export const riskAccidentCasesReasonExport = (data,fileName) => {
    return $download('/risk/riskAccidentCasesReason/export',data, fileName)
}
